package com.infore.maintenance.main.service;


import com.baomidou.mybatisplus.service.IService;
import com.infore.common.enums.ExecuteSql;
import com.infore.common.model.entity.TBaseQuerySql;
import com.infore.common.response.ApiListResponse;
import com.infore.common.response.ApiPageResponse;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 数据增删改查操作 服务类
 * </p>
 *
 * @author lijh
 * @since 2023-01-11
 */
public interface CrudHandleService extends IService<TBaseQuerySql> {

    int insertTableListDynamic(String databaseSchema,String tableName,Map<String, String> columnProperty,String jsonArrayData);


    int insertTableEntityDynamic(String databaseSchema, String tableName, Map<String, String> columnProperty, String jsonData);


    int updateTableEntityDynamic(String databaseSchema, String tableName, Map<String, String> setColumnAndValue, Map<String, String> whereColumnAndValue);


    int deleteTableEntityDynamic(String databaseSchema, String tableName, Map<String, String> whereColumnAndValue);

    int executeBySql(ExecuteSql type, String sql);

    int executeBySql(ExecuteSql type, String sql,Map<String, Object> map);

    ApiListResponse<Map<String, Object>> queryBySql(String sql);

    ApiPageResponse<Map<String, Object>> queryPageBySql(String sql, int pageNum, int limit);
}
